package com.example.sportzbreak;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class WelcomeActivity extends Activity{
	
	private ImageButton btnPractice;
	private ImageButton btnPlay;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome_activity);
		
		btnPractice = (ImageButton) findViewById(R.id.PracticeBtn);
		btnPlay = (ImageButton) findViewById(R.id.PlayBtn);
		
		// listeners
		btnPractice.setOnClickListener(new OnClickListener()
		{
			public void onClick(View view){
				LaunchLevelActivity();
			}
		});	
		
		btnPlay.setOnClickListener(new OnClickListener()
		{
			public void onClick(View view){
				LaunchLevelActivity();
			}
		});	
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	public void LaunchLevelActivity() {
	    Intent i = new Intent(this, LevelActivity.class);
	    startActivity(i);
	}
}
